#!/usr/bin/env python

import sys
import time

messages = [
	'neighbor 127.0.0.1 announce route 1.4.0.0/16 rd 65000:1 next-hop 101.1.101.1 community 100:1 extended-community 0x0002FDE900000001 label 1000',
	'neighbor 127.0.0.1 withdraw route 1.4.0.0/16 rd 65000:1 next-hop 101.1.101.1 community 100:1 extended-community 0x0002FDE900000001 label 1000',
	#'announce route 1.4.0.0/16 rd 65000:1 next-hop 101.1.101.1 community 100:1 extended-community 0x0002FDE900000001 label 1000',
	#'withdraw route 1.4.0.0/16 rd 65000:1 next-hop 101.1.101.1 community 100:1 extended-community 0x0002FDE900000001 label 1000',
]

while messages:
	time.sleep(2)
	message = messages.pop(0)
	sys.stdout.write(message + '\n')
	sys.stdout.flush()

while True:
	time.sleep(1)
